/*
* ============================================================================
*  Name     : CV8LogSumInfoContainer from V8LogSumInfoContainer.h
*  Part of  : v8Log
*  Created  : 2006-4-7 by key
*  Description:
*     Declares container control for application.
*  Version  :
*  Copyright: http:www.3gv8.com
* ============================================================================
*/

#ifndef V8LOGSUMINFOCONTAINER_H
#define V8LOGSUMINFOCONTAINER_H

// INCLUDES
#include <coecntrl.h>
#include <logwrap.h>
#include "TLogparse.h"
#include "EventsObserver.h" // MEventsObserver
#include <aknprogressdialog.h> 
// FORWARD DECLARATIONS

class CAknWaitDialog;
class CAknColumnListBox;
class CEikLabel;        // for example labels
class CLogParse;
class CV8LogAppUi;
// CLASS DECLARATION

/**
*  CV8LogSumInfoContainer  container control class.
*  
*/
class CV8LogSumInfoContainer : public CCoeControl, 
							   public MCoeControlObserver,
							   public MEventsObserver,
							   public MProgressDialogCallback
    {
    public: // Constructors and destructor
        
        /**
        * EPOC default constructor.
        * @param aRect Frame rectangle for container.
        */
        void ConstructL(const TRect& aRect,CV8LogAppUi* aUI);

        /**
        * Destructor.
        */
        ~CV8LogSumInfoContainer();

    public: // New functions

    public: // Functions from base classes(MEventsObserver)
	    void DialogDismissedL(TInt /*aButtonId*/);
	    void NotifyStopReadEventL();
	    void ShowBusyDialogL();
	    void CancelBusyDialog();

		/**
		* Reads a notify
		* @param aEvent event to be read
		*/	
	    void NotifyEventDeletedL();
		/**
		* Reads a notify
		* @param aEvent event to be read
		*/
	    void NotifyEventAddedL(const CLogEvent& aEvent);
		/**
		* Notifies an event is deleted
		*/
	    void NotifyEventReadL(const CLogEvent& aEvent);

    private: // Functions from base classes

       /**
        * From CoeControl,SizeChanged.
        */
        void SizeChanged();

       /**
        * From CoeControl,CountComponentControls.
        */
        TInt CountComponentControls() const;

       /**
        * From CCoeControl,ComponentControl.
        */
        CCoeControl* ComponentControl(TInt aIndex) const;

       /**
        * From CCoeControl,Draw.
        */
        void Draw(const TRect& aRect) const;

       	
		/**
		* From MCoeControlObserver
		* Acts upon changes in the hosted control's state. 
		*
		* @param	aControl	The control changing its state
		* @param	aEventType	The type of control event 
		*/
        void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
        
    private: //data
        
       // CEikLabel* iLabel;          // example label
       // CEikLabel* iToDoLabel;      // example label

		CLogParse*  iLogParse;
		const CFont* iFont;
		CV8LogAppUi* ui;

		CAknWaitDialog*				iBusyNote;
		TBool iDoOnce;
    };	

#endif

// End of File
